---
title: "Terms"
author: "`r Sys.info()['user']`"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.width = 10, fig.height = 5)
require(gplots)
require(LSX)
require(ggplot2)

lss_en <- readRDS("lss_en.RDS")
lss_ja <- readRDS("lss_ja.RDS")
```

```{r}
highlight <- c("good", "fortune", "well-managed", "satisfaction", "optimistic",
               "prolonged", "indebted", "recession", "crisis", "troubled", 
               "new", "business", "harm")
textplot_terms(lss_en, highlighted = highlight) + xlim(-0.1, 0.1)
```

```{r}
head(coef(lss_en), 50)
tail(coef(lss_en), 50)
```

```{r}
highlight <- c("絶好", "人類", "民主化", "安定", "立国", 
               "私利私欲", "暴力団", "脱税事件", "不透明", "流用",
               "問題", "考え", "独裁")
textplot_terms(lss_ja, highlighted = highlight) + xlim(-0.1, 0.1)
```

```{r}
head(coef(lss_ja), 100)
tail(coef(lss_ja), 50)
```
